package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <h3>springboot-jasypt</h3>
 * <p></p>
 *
 * @author : zhengyue
 * @date : 2020-10-21 11:57
 **/
@RestController
public class DemoController {
    @Value("${my.conf.test1}")
    private String test1;

    @Value("${my.conf.test2}")
    private String test2;

    @GetMapping("/hello")
    public String hello(Integer num) {
        return num == 1
                ? test1 : test2;
    }
}
